/**
 * User: alesj
 * Date: 2005.6.8
 * Time: 11:20:35
 *
 * (C) Genera Lynx d.o.o.
 */

package com.generalynx.ecos.page;

import java.io.Serializable;

import org.hibernate.transform.ResultTransformer;

/**
 * Each PageScroll defined in bean factory must be marked
 * as prototype (not singleton).
 */
public interface PageScroll {

    static final String LINK_PATTERN = "<a href=\"#\" onclick=\"return jump({1});\">{0}</a>";
    static final String BOLD_PATTERN = "<b>{0}</b>";

    void setClass(Class clazz);

    Serializable getCurrentIdentifier();

    void setCurrentIdentifier(String stringIdentifier);

    Serializable getPreviousIdentifier();

    Serializable getNextIdentifier();

    int firstResult();

    int getLimit();

    boolean hasTotalCount();

    int getTotalCount();

    void setTotalCount(int totalCount);

    boolean isUsePageScroll();

    boolean hasPrevious();

    boolean hasNext();

    boolean isLast();

    boolean isFirst();

    String getTaskbar();

    /* HQL query */

    boolean isLimitable();

    String query();

    Object propertiesBean();

    String orderBy();

    ResultTransformer transformer();
}
